home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2006 May / PCpro_2006_05.ISO / files / mobile / fma-2.0-stable-setup.exe / {app} / sframework / plugins / AutoMenu.vbs next >
Encoding:
Text File  |  2004-09-09  |  1.7 KB  |  55 lines

  1. 'FMA Script Framework Plugin
  2. 'AutoMenu
  3. 'This will go to a specified plugin menu after connection.
  4. 'The menu can be specified with the configurator
  5.  
  6. 'TODO:
  7. '-nothing atm
  8.  
  9. Class AutoMenu
  10.     
  11.     Private m_Self
  12.     
  13.     'Some info about the plugin
  14.     Public Property Get SHOWABLE 'Do I have a menu?
  15.         SHOWABLE    = False
  16.     End Property
  17.     Public Property Get TITLE 'What's my name?
  18.         TITLE       = "AutoMenu"
  19.     End Property
  20.     Public Property Get DESCRIPTION 'What's my purpose?
  21.         DESCRIPTION = "This will go into the accessories menu after connection"
  22.     End Property
  23.     Public Property Get AUTHOR 'Who created me?
  24.         AUTHOR      = "streawkceur"
  25.     End Property
  26.     Public Property Get URL 'Were can I be found? Where can you get more information?
  27.         URL = "http://fma.xinium.com/"
  28.     End Property
  29.     
  30.     'Who am I?
  31.     Public Property Let Self (s)
  32.         m_Self = s
  33.         If IsEmpty(Settings(Me, "Menu")) Or Settings(Me, "Menu") = "" Then Settings(Me, "Menu") = "FrameworkMainMenu" 'MainMenu as default
  34.         EventManager.RegisterEvent "Connected", m_Self & ".GotoMenu", Me
  35.     End Property
  36.     Public Property Get Self
  37.         Self = m_Self
  38.     End Property
  39.     
  40.     Sub GotoMenu
  41.         'Show main menu first
  42.         If PluginManager.IsLoaded("FrameworkMainMenu") Then
  43.             PluginManager("FrameworkMainMenu").Show
  44.         Else
  45.             Debug.ErrorMsg Self & ": Couldn't go to FrameworkMainMenu! The plugin is not loaded."
  46.         End If
  47.         'Show specific plugin menu
  48.         If LCase(Settings(Me, "Menu")) <> "frameworkmainmenu" And PluginManager.IsLoaded(Settings(Me, "Menu")) Then
  49.             PluginManager(Settings(Me, "Menu")).Show
  50.         Else
  51.             Debug.ErrorMsg Self & ": Couldn't go to menu """ & Settings(Me, "Menu") & """! The plugin is not loaded."
  52.         End If
  53.     End Sub
  54.     
  55. End Class
  56.